import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Main {
    public static void main(String[] args){
        ApplicationContext context = new ClassPathXmlApplicationContext("application.xml");
        People zs = context.getBean("zs", People.class);
        System.out.println(zs);
        System.out.println("姓名：" + zs.getName());
        System.out.println("手机：" + zs.getPhone().getBrand());
        System.out.println("电脑：" + zs.getPc().getBrand());

//        People ww = context.getBean("ww", People.class);
//        System.out.println(ww);
//        System.out.println("姓名：" + ww.getName());
//        System.out.println("手机：" + ww.getPhone().getBrand());
//        System.out.println("电脑：" + ww.getPc().getBrand());
    }
}
